package com.example.demo.rest.ecom;

import com.example.demo.api.ecom.CommonApi;
import io.swagger.annotations.ApiImplicitParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CommonController {

    @Autowired
    CommonApi commonApi;

    @GetMapping("addressrule")
    @ApiImplicitParam(name = "country", value = "country", paramType = "query", defaultValue = "us")
    public Object addressrule(@RequestParam("country") String  country) {
        return commonApi.addressrule(country);
    }


}
